/*
 * JavaVehApp.h
 *
 *  Created on: Dec 15, 2013
 *      Author: davemckenney
 */

#ifndef JAVAVEHAPP_H_
#define JAVAVEHAPP_H_

#ifdef _WIN32
#define PATH_SEPARATOR ';'
#else
#define PATH_SEPARATOR ':'
#endif

#include <jni.h>
#include "BaseWaveApplLayer.h"
#include "VeinsAdapter.h"
#include "mobility/traci/TraCIMobility.h"
#include <string>
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include <utility>
#include <map>

class VeinsAdapter;

class JavaVehApp : public BaseWaveApplLayer {
public:
    JavaVehApp();
    virtual ~JavaVehApp();
    virtual void initialize(int stage);//
    virtual void finish();//
    virtual void onBeacon(WaveShortMessage* wsm);//
    virtual void onData(WaveShortMessage* wsm);//
    virtual void handlePositionUpdate(cObject* obj);
    void receiveMessage(const char* msg);
    void scheduleSelfMsg(const char* msg);

    void testChange();
    void handleSelfMsg(cMessage* msg);//
    int vehID;
    static int initID;
    long status;
    static bool isInit;

    VeinsAdapter * adapter;
};


#endif /* JAVAVEHAPP_H_ */
